package com.rede.didiok.rank.service;

import java.util.List;
import java.util.Map;

import com.baomidou.mybatisplus.extension.service.IService;
import com.rede.didiok.common.dto.rank.RankPraiseRecordDto;
import com.rede.didiok.common.dto.user.UserDto;
import com.rede.didiok.common.utils.PageUtils;
import com.rede.didiok.rank.entity.RankPraiseRecordEntity;

/**
 * 用户点赞表
 *
 * @author Rede
 * @email didiok@foxmail.com
 * @date 2023-09-05 17:47:48
 */
public interface RankPraiseRecordService extends IService<RankPraiseRecordEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 有效点赞/踩数
     *
     * @return
     */
    Map<String, Object> praisedCount(RankPraiseRecordDto userPraiseRecordVO);

    /**
     * 一周内点赞量
     *
     * @param userUid
     * @return
     */
    Integer getPraiseCountByWeek(String userUid);

    /**
     * 获取点赞数
     *
     * @param userPraiseRecordVO
     * @return
     */
    Integer getPraiseCount(RankPraiseRecordDto userPraiseRecordVO);

    /**
     * 刷数
     *
     * @return
     */
    String refreshPraise();


    /**
     * 点赞指定资源文件
     *
     * @return
     */
    String praise(RankPraiseRecordDto userPraiseRecordVO);

    /**
     * 点踩指定资源文件
     *
     * @return
     */
    String tread(RankPraiseRecordDto userPraiseRecordVO);

    /**
     * 取消点赞
     *
     * @return
     */
    String cancelPraise(RankPraiseRecordDto userPraiseRecordVO);

    /**
     * 取消点踩
     *
     * @return
     */
    String cancelTread(RankPraiseRecordDto userPraiseRecordVO);

    /**
     * 是否已点赞/踩
     *
     * @param userPraiseRecordVO
     * @return
     */
    Boolean hasPraised(RankPraiseRecordDto userPraiseRecordVO);

    /**
     * 获取点赞的用户列表
     *
     * @param userPraiseRecordVO
     * @return
     */
    List<UserDto> getPraiseList(RankPraiseRecordDto userPraiseRecordVO);
}

